PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Appearance Manager >

Programming With the Appearance Manager


GetThemeButtonRegion

Obtains the region occupied by a button.

pascal OSStatus GetThemeButtonRegion (
                     const Rect *inBounds,
                     ThemeButtonKind inKind,
                     const ThemeButtonDrawInfo *inNewInfo,
                     RgnHandle outRegion);
inBounds
A pointer to a structure of type Rect . Before calling GetThemeButtonRegion , set the rectangle to the boundary of the button without any adornments, in local coordinates.
inKind
A value of type ThemeButtonKind . Pass a constant specifying the type of button being examined. See Theme Button Kind Constants for descriptions of possible values.
inNewInfo
A pointer to a structure of type ThemeButtonDrawInfo . Before calling GetThemeButtonRegion , set the structure to contain the state, value, and adornment for the button.
outRegion
A value of type RgnHandle . On return, the region contains the actual dimensions and position of the button and any adornments, in local coordinates.
function result
A result code; see Result Codes .
DISCUSSION

Appearance adornments can extend beyond the basic bounding rectangle of a button and may be of variable shape. Your application may call the GetThemeButtonRegion function to obtain the exact area covered by pixels belonging to a specific button under the current theme.

VERSION NOTES

Available with Appearance Manager 1.1 and later.


© 1999 Apple Computer, Inc. – (Last Updated 29 April 99)